<%@ page contentType="text/html;charset=UTF-8" language="java"  import="java.util.*" trimDirectiveWhitespaces="true" %>
<%@include file="/WEB-INF/pages/common/taglib.jsp"%>
<!DOCTYPE html>
<html lang="en">
<head>
  <title>商城评价管理</title>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <%@include file="/WEB-INF/pages/common/commonCss.jsp"%>
  <link rel="stylesheet" href="${basePath}/resources/css/uniform.css" />
  <link rel="stylesheet" href="${basePath}/resources/css/select2.css" />
  <link rel="stylesheet" href="${basePath}/resources/css/matrix-style.css" />
  <link rel="stylesheet" href="${basePath}/resources/css/matrix-media.css" />
  <link rel="stylesheet" href="${basePath}/resources/css/admin/list.css" />
</head>

<body>

<!--Header-part-->
<%@include file="/WEB-INF/pages/common/head.jsp"%>


<!--sidebar-menu-->
<%@include file="/WEB-INF/pages/common/left.jsp"%>

<div id="content">
  <div id="content-header">
    <div id="breadcrumb">
      <a href="${adminPath}/index" title="Go to Home" class="tip-bottom"><i class="icon-home"></i> 首页</a>
      <a href="#" class="current">商城评价管理</a> </div>
  </div>

  <div class="container-fluid">

    <hr>
    <div class="row-fluid">
      <div class="span12">


        <div class="widget-box">
          <div class="widget-title"> <span class="icon"><i class="icon-th"></i></span>
            <h5>Data table</h5>
            <a style="float: right;margin-top: 0.2rem" onclick="tzAdmin.search()" class="btn btn-success"><i class="icon-search icon-white"></i></a>

            <label style="float: right;margin-top: 0.2rem">
              <input type="text" id="keywords" aria-controls="DataTables_Table_0" placeholder="输入查询关键字">
            </label>

          </div>
          <div class="widget-content nopadding">
            <table class="table table-bordered data-table">
              <thead>

              <tr>
                <th width="5%">主键</th>
                <th width="10%">会员昵称<span class="up"></span> <span class="down"></span></th>
                <th width="20%">商品名称</th>
                <th width="20%">评价内容</th>
                <th width="10%">评价时间</th>
                <th width="10%">评价图片</th>
                <th width="5%">删除状态</th>
                <th width="20%">操作</th>
              </tr>
              </thead>
              <tbody id="tbody" data-model="shop/comment">
                  <tr>
                    <td id="loading" colspan="50"></td>
                  </tr>


              </tbody>
               <tfoot>

               </tfoot>
            </table>
            <div class="cpage"></div>

          </div>
        </div>
      </div>
    </div>
  </div>
</div>


<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
          &times;
        </button>
        <h4 class="modal-title" id="myModalLabel">评价图片</h4>
      </div>
      <div class="modal-body">
        <ul id="imgUrl">
          <li></li>
        </ul>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭
        </button>
        <%--<button type="button" class="btn btn-primary"  onclick="handler.confirmService(this,'${order.orderno}','${order.type}')">--%>
          <%--提交更改--%>
        <%--</button>--%>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal -->
</div>

   <!--Footer-part-->
<%@include file="/WEB-INF/pages/common/footer.jsp"%>

<!--end-Footer-part-->

<%@include file="/WEB-INF/pages/common/commonJS.jsp"%>
   <script type="text/javascript" src="${basePath}/resources/sg/tz_page.js"></script>
   <script src="${basePath}/resources/js/jquery.ui.custom.js"></script>
<script src="${basePath}/resources/js/bootstrap.min.js"></script>
<script src="${basePath}/resources/js/jquery.uniform.js"></script>
<script src="${basePath}/resources/js/select2.min.js"></script>
<script src="${basePath}/resources/js/jquery.dataTables.min.js"></script>
<script src="${basePath}/resources/js/matrix.js"></script>
<%--<script src="${basePath}/resources/js/matrix.tables.js"></script>--%>

   <script>
       $(function(){
         tzAdmin.loadData(0,10,function(itemCount){
           tzAdmin.initPage(itemCount);//分页加载一次吗
         });
       });

       var commnent = {
           showPicture: function (obj, id) {
               $.ajax({
                   url: adminPath + "/shop/comment/getPictures/" + id,
                   type: 'GET',
                   success: function (data) {
                       console.log('data==' + JSON.stringify(data));
                       var html = "";
                       if(data.length>0){
                           for(var i=0,len=data.length;i<len;i++) {
                               console.log(data[i].url);
                               html += "<li><img src='"+data[i].url+"'></li>";
                           }
                       }else{
                           html = "暂无图片";
                       }
                       $('#imgUrl').html(html);
                       $('#myModal').modal('show');
                   }
               });
           }
       }
   </script>


</body>
</html>
